//index.js
//获取应用实例
 

const app=getApp()
Page({
  data: {
    showModal: false,
    navbarData: {
      showCapsule: 1, //是否显示左上角图标   1表示显示    0表示不显示
      title: '建档信息', //导航栏 中间的标题
    },
    navHeight: app.globalData.statusBarHeight * 2 + 86,
  },
  onLoad(){
    var that = this;
    wx.request({
      url: app.getUrl('/xcx/getConsent'),
      method: 'GET',
      header: wx.getStorageSync('cookie'),
      success(res) {
        that.setData({
          consent:res.data.data
        })
      }
    })
  },
  toConsent: function(){
    wx.navigateTo({
      url: "/pages/guide/consent/consent?url="+ this.data.consent.url
    })
  },
  toExitPro: function(){
    //点击退出时去设置微信用户状态
    wx.request({
      url: app.getUrl('/xcx/exit'),
      method: 'GET',
      header: wx.getStorageSync('cookie'),
      success(res) {
        console.log(res)
      }
    })
  },
  toPersonInfo:function(){
    wx.navigateTo({
      url:'../Info/Info'
    })
  },
  open: function () {
    this.setData({
      showModal: true
    })
  },
  hideModal() {
    this.setData({
      showModal: false
    });
  },
})